<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>DownloadCenter API说明文档 | 简介</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../download/download_observer.html" />
    
    
    <link rel="prev" href="../download/download_letter.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="3.2"
        data-chapter-title="DownloadCenter API说明文档"
        data-filepath="download/download_center.md"
        data-basepath=".."
        data-revision="Thu Apr 14 2016 20:52:34 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        简介
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="part0/index.html">
            
                
                    <a href="../part0/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        快速开始
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="part0/import_project.html">
            
                
                    <a href="../part0/import_project.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        集成工程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="part0/demoyun_xing_xiao_guo_ji_shi_yong.html">
            
                
                    <a href="../part0/demoyun_xing_xiao_guo_ji_shi_yong.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        demo运行效果及使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="part0/get_start_play.html">
            
                
                    <a href="../part0/get_start_play.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        启动播放器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="part0/handle_video_ratio.html">
            
                
                    <a href="../part0/handle_video_ratio.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        处理视频比例
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="part0/handle_video_view_change.html">
            
                
                    <a href="../part0/handle_video_view_change.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        处理屏幕旋转
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="part0/pano_quick_start.html">
            
                
                    <a href="../part0/pano_quick_start.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        全景播放
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="part0/hanlde_proguard.html">
            
                
                    <a href="../part0/hanlde_proguard.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        关于混淆
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="part1/index.html">
            
                
                    <a href="../part1/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        第一章
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="part1/player_structure.html">
            
                
                    <a href="../part1/player_structure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        播放器基本架构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="part1/player_api_Intro.html">
            
                
                    <a href="../part1/player_api_Intro.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        LetvPlayer播放器API说明
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="part1/playcontext_introduction.html">
            
                
                    <a href="../part1/playcontext_introduction.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        PlayContext ApI说明
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="download/download_module.html">
            
                
                    <a href="../download/download_module.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        下载模块
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="download/download_letter.html">
            
                
                    <a href="../download/download_letter.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        快速接入
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="3.2" data-path="download/download_center.html">
            
                
                    <a href="../download/download_center.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        DownloadCenter API说明文档
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="download/download_observer.html">
            
                
                    <a href="../download/download_observer.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        LeDownloadObserver API说明文档
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="download/download_info.html">
            
                
                    <a href="../download/download_info.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        LeDownloadInfo API 说明文档
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="update.html">
            
                
                    <a href="../update.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        更新说明
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5" data-path="fqa.html">
            
                
                    <a href="../fqa.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        Q&amp;A
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >简介</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="downloadcenter-api&#x8BF4;&#x660E;&#x6587;&#x6863;">DownloadCenter API&#x8BF4;&#x660E;&#x6587;&#x6863;</h1>
<table>
<thead>
<tr>
<th>&#x65B9;&#x6CD5;&#x540D;</th>
<th>&#x7B80;&#x4ECB;</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="#getInstances">getInstances</a></td>
<td>&#x83B7;&#x53D6; DownloadCenter&#x5BF9;&#x8C61;&#xFF0C;&#x5355;&#x4F8B;&#x6A21;&#x5F0F;</td>
</tr>
<tr>
<td><a href="#downloadVideo">downloadVideo</a></td>
<td>&#x4E0B;&#x8F7D;&#x89C6;&#x9891;</td>
</tr>
<tr>
<td><a href="#allowShowMsg">allowShowMsg</a></td>
<td>&#x662F;&#x5426;&#x663E;&#x793A;&#x4E0B;&#x8F7D;toast&#x63D0;&#x793A;</td>
</tr>
<tr>
<td><a href="#setDownloadSavePath">setDownloadSavePath</a></td>
<td>&#x8BBE;&#x7F6E;&#x672C;&#x5730;&#x89C6;&#x9891;&#x4FDD;&#x5B58;&#x8DEF;&#x5F84;</td>
</tr>
<tr>
<td><a href="#setDownloadRateText">setDownloadRateText</a></td>
<td>&#x8BBE;&#x7F6E;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x7684;&#x9ED8;&#x8BA4;&#x4E0B;&#x8F7D;&#x7801;&#x7387;</td>
</tr>
<tr>
<td><a href="#getDownloadInfoList">getDownloadInfoList</a></td>
<td>&#x83B7;&#x53D6;&#x6240;&#x6709;&#x4E0B;&#x8F7D;&#x4EFB;&#x52A1;&#x5217;&#x8868;</td>
</tr>
<tr>
<td><a href="#getDownloadInfoSize">getDownloadInfoSize</a></td>
<td>&#x83B7;&#x53D6;&#x4E0B;&#x8F7D;&#x4EFB;&#x52A1;&#x7684;&#x6570;&#x91CF;</td>
</tr>
<tr>
<td><a href="#setMaxDownloadThread">setMaxDownloadThread</a></td>
<td>&#x8BBE;&#x7F6E;&#x540C;&#x65F6;&#x4E0B;&#x8F7D;&#x7684;&#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;</td>
</tr>
<tr>
<td><a href="#resumeDownload">resumeDownload</a></td>
<td>&#x6062;&#x590D;&#x4E0B;&#x8F7D;</td>
</tr>
<tr>
<td><a href="#stopDownload">stopDownload</a></td>
<td>&#x6682;&#x505C;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x4E0B;&#x8F7D;</td>
</tr>
<tr>
<td><a href="#retryDownload">retryDownload</a></td>
<td>&#x91CD;&#x8BD5;&#x4E0B;&#x8F7D;&#x5931;&#x8D25;&#x7684;&#x89C6;&#x9891;</td>
</tr>
<tr>
<td><a href="#stopAllDownload">stopAllDownload</a></td>
<td>&#x505C;&#x6B62;&#x5F53;&#x524D;&#x6240;&#x6709;&#x89C6;&#x9891;</td>
</tr>
<tr>
<td><a href="#cancelDownload">cancelDownload</a></td>
<td>&#x53D6;&#x6D88;&#x4E0B;&#x8F7D;&#x5E76;&#x4E14;&#x5220;&#x9664;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#x7684;&#x4FE1;&#x606F;,&#x53EF;&#x4EE5;&#x5220;&#x9664;&#x672C;&#x5730;&#x6587;&#x4EF6;</td>
</tr>
<tr>
<td><a href="#findDownloadInfo">findDownloadInfo</a></td>
<td>&#x67E5;&#x627E;&#x5F53;&#x524D;VU&#x6240;&#x5BF9;&#x5E94;&#x7684;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#x7684;DownloadInfo&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td><a href="#getDownloadFilePath">getDownloadFilePath</a></td>
<td>&#x83B7;&#x53D6;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x4FDD;&#x5B58;&#x7684;&#x672C;&#x5730;&#x8DEF;&#x5F84;</td>
</tr>
<tr>
<td><a href="#isDownloadCompleted">isDownloadCompleted</a></td>
<td>&#x67E5;&#x8BE2;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x662F;&#x5426;&#x4E0B;&#x8F7D;&#x5B8C;&#x6210;</td>
</tr>
<tr>
<td><a href="#registerDownloadObserver">registerDownloadObserver</a></td>
<td>&#x6CE8;&#x518C;&#x4E0B;&#x8F7D;&#x72B6;&#x6001;&#x76D1;&#x542C;&#x7684;Observer</td>
</tr>
<tr>
<td><a href="#unregisterDownloadObserver">unregisterDownloadObserver</a></td>
<td>&#x53D6;&#x6D88;&#x6CE8;&#x518C;&#x72B6;&#x6001;&#x76D1;&#x542C;Observer</td>
</tr>
<tr>
<td><a href="#setOnDownloadListener">setOnDownloadListener</a></td>
<td>&#x8BBE;&#x7F6E;&#x4E0B;&#x8F7D;&#x8FC7;&#x7A0B;&#x4E2D;&#x76D1;&#x542C;&#x4E8B;&#x4EF6;&#xFF0C;&#x548C;&#x7801;&#x7387;&#x8BBE;&#x7F6E;&#x642D;&#x914D;&#x4F7F;&#x7528;</td>
</tr>
</tbody>
</table>
<h2 id="&#x65B9;&#x6CD5;&#x8BE6;&#x7EC6;&#x8D44;&#x6599;">&#x65B9;&#x6CD5;&#x8BE6;&#x7EC6;&#x8D44;&#x6599;</h2>
<ul>
<li><blockquote>
<p><a id="getInstances">getInstances</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *   &#x5355;&#x4F8B;&#x6A21;&#x5F0F;&#xFF0C;&#x83B7;&#x53D6;DownloadCenter &#x5BF9;&#x8C61;
 *
 * <span class="hljs-doctag">@param</span> context &#x4E0A;&#x4E0B;&#x6587;
 * <span class="hljs-doctag">@return</span> DownloadCenter&#x5BF9;&#x8C61;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">synchronized</span> DownloadCenter <span class="hljs-title">getInstances</span><span class="hljs-params">(Context context)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="downloadVideo">downloadVideo</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x4E0B;&#x8F7D;&#x89C6;&#x9891;(3.0&#x5DF2;&#x6709;&#x7684;&#x63A5;&#x53E3;)
 *  
 * <span class="hljs-doctag">@param</span> userKey &#x7528;&#x6237;&#x5BC6;&#x94A5;(&#x53EF;&#x4EE5;&#x4E3A;&#x201C;&#x201D;)
 * <span class="hljs-doctag">@param</span> uu &#x5F53;&#x524D;&#x7528;&#x6237;&#x7684;UUID(&#x4E0D;&#x53EF;&#x4EE5;&#x4E3A;&#x7A7A;)
 * <span class="hljs-doctag">@param</span> vu &#x5F53;&#x524D;&#x89C6;&#x9891;&#x7684;VUID(&#x4E0D;&#x53EF;&#x4EE5;&#x4E3A;&#x7A7A;)
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">downloadVideo</span><span class="hljs-params">(String userKey, String uu, String vu)</span>

<span class="hljs-comment">/**
 *  &#x4E0B;&#x8F7D;&#x89C6;&#x9891;&#xFF08;3.0&#x5DF2;&#x6709;&#x7684;&#x63A5;&#x53E3;&#xFF09;&#xFF0C;&#x5DF2;&#x8FC7;&#x671F;&#xFF0C;&#x4E0D;&#x5EFA;&#x8BAE;&#x4F7F;&#x7528;&#x8FD9;&#x79CD;&#x65B9;&#x5F0F;
 * 
 * @param userKey &#x7528;&#x6237;&#x5BC6;&#x94A5;(&#x53EF;&#x4EE5;&#x4E3A;&quot;&quot;)
 * @param uu &#x5F53;&#x524D;&#x7528;&#x6237;&#x7684;UUID(&#x4E0D;&#x53EF;&#x4EE5;&#x4E3A;&#x7A7A;)
 * @param rateText &#x9700;&#x8981;&#x4E0B;&#x8F7D;&#x7684;&#x89C6;&#x9891;&#x7801;&#x7387;
 */</span>
    <span class="hljs-title">downloadVideo</span><span class="hljs-params">(String userKey, String uu, String vu,String rateText)</span>
<span class="hljs-comment">/**
 *  &#x4E0B;&#x8F7D;&#x89C6;&#x9891;    (4.0&#x65B0;&#x52A0;&#x7684;&#x63A5;&#x53E3;)
 *  
 * @param info SDK&#x5C01;&#x88C5;&#x7684;&#x4E0B;&#x8F7D;Model,&#x63A8;&#x8350;&#x4F7F;&#x7528;&#x8FD9;&#x79CD;&#x65B9;&#x5F0F;&#xFF0C;&#x5728;LedownloadInfo&#x4E2D;&#x63D0;&#x4F9B;&#x4E86;&#x9644;&#x52A0;&#x53C2;&#x6570;&#xFF0C;&#x65B9;&#x4FBF;&#x7528;&#x6237;&#x7684;
 */</span>
<span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">downloadVideo</span><span class="hljs-params">(LeDownloadInfo info)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="allowShowMsg">allowShowMsg</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 * &#x662F;&#x5426;&#x663E;&#x793A;&#x4E0B;&#x8F7D;toast&#x63D0;&#x793A;&#x3002;(&#x5EFA;&#x8BAE;&#x5728;&#x6D4B;&#x8BD5;&#x8FC7;&#x7A0B;&#x4E2D;&#x663E;&#x793A;&#x63D0;&#x793A;)
 * 
 * <span class="hljs-doctag">@param</span> b &#x5982;&#x679C;&#x4E3A;&#x771F; &#x8868;&#x793A;&#x663E;&#x793A;&#x63D0;&#x793A;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">allowShowMsg</span><span class="hljs-params">(<span class="hljs-keyword">boolean</span> b)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="setDownloadSavePath">setDownloadSavePath</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x8BBE;&#x7F6E;&#x672C;&#x5730;&#x89C6;&#x9891;&#x6587;&#x4EF6;&#x4FDD;&#x5B58;&#x8DEF;&#x5F84;
 *
 * <span class="hljs-doctag">@param</span> path  &#x672C;&#x5730;&#x89C6;&#x9891;&#x6587;&#x4EF6;&#x4FDD;&#x5B58;&#x8DEF;&#x5F84;&#xFF0C;&#x5EFA;&#x8BAE;&#x4E0D;&#x8981;&#x653E;&#x5728;&#x5E94;&#x7528;&#x8DEF;&#x5F84;&#x4E0B;&#xFF0C;&#x5BB9;&#x6613;&#x88AB;&#x6E05;&#x7406;&#x5DE5;&#x5177;&#x5F53;&#x4F5C;&#x5E94;&#x7528;&#x5783;&#x573E;&#x6E05;&#x7406;&#x6389;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">setDownloadSavePath</span><span class="hljs-params">(String path)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="setDownloadRateText">setDownloadRateText</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**    
 *  &#x8BBE;&#x7F6E;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x7684;&#x9ED8;&#x8BA4;&#x4E0B;&#x8F7D;&#x7801;&#x7387;(4.0&#x65B0;&#x52A0;&#x63A5;&#x53E3;)
 *  
 * <span class="hljs-doctag">@param</span> text &#x5F53;&#x524D;&#x89C6;&#x9891;&#x7684;&#x9ED8;&#x8BA4;&#x7801;&#x7387;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">setDownloadRateText</span><span class="hljs-params">(String text)</span>  


&#x793A;&#x4F8B;&#xFF1A;
downloadCenter.<span class="hljs-title">setOnDownloadListener</span><span class="hljs-params">(new DownloadListener()</span> </span>{

    <span class="hljs-annotation">@Override</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">onGetVideoInfoRate</span><span class="hljs-params">(LeDownloadInfo info, List&lt;String&gt; rates)</span> </span>{
        <span class="hljs-keyword">if</span> (rates != <span class="hljs-keyword">null</span> &amp;&amp; rates.size() &gt; <span class="hljs-number">0</span>) {
            downloadCenter.setDownloadRateText(rates.get(<span class="hljs-number">0</span>));
        }
    }
});
</code></pre>
<ul>
<li><blockquote>
<p><a id="getDownloadInfoList">getDownloadInfoList</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x83B7;&#x53D6;&#x6240;&#x6709;&#x4E0B;&#x8F7D;&#x4EFB;&#x52A1;&#x5217;&#x8868;
 *  
 * return &#x8FD4;&#x56DE;&#x6240;&#x6709;&#x7684;&#x4E0B;&#x8F7D;&#x4EFB;&#x52A1;&#x5217;&#x8868;&#xFF0C;&#x5305;&#x62EC;&#x672A;&#x5F00;&#x59CB;&#x3001;&#x6B63;&#x5728;&#x4E0B;&#x8F7D;&#x3001;&#x4E0B;&#x8F7D;&#x5B8C;&#x6210;&#x3001;&#x5931;&#x8D25;&#x7B49;&#x6240;&#x6709;&#x7684;&#x5217;&#x8868;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> List&lt;LeDownloadInfo&gt; <span class="hljs-title">getDownloadInfoList</span><span class="hljs-params">()</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="getDownloadInfoSize">getDownloadInfoSize</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x83B7;&#x53D6;&#x4E0B;&#x8F7D;&#x4EFB;&#x52A1;&#x7684;&#x6570;&#x91CF;
 *  
 * return &#x8FD4;&#x56DE;&#x4E00;&#x4E2A;int&#x503C;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">int</span> <span class="hljs-title">getDownloadInfoSize</span><span class="hljs-params">()</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="setMaxDownloadThread">setMaxDownloadThread</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x8BBE;&#x7F6E;&#x540C;&#x65F6;&#x4E0B;&#x8F7D;&#x7684;&#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;&#xFF0C;&#x5EFA;&#x8BAE;&#x503C;1~5
 *  
 * <span class="hljs-doctag">@param</span> mMaxDownloadThread &#x6700;&#x5927;&#x7EBF;&#x7A0B;&#x6570;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;3
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">setMaxDownloadThread</span><span class="hljs-params">(<span class="hljs-keyword">int</span> mMaxDownloadThread)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="resumeDownload">resumeDownload</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 * &#x6062;&#x590D;&#x89C6;&#x9891;&#x4E0B;&#x8F7D;&#xFF0C;&#x548C;stopDownload&#x642D;&#x914D;&#x4F7F;&#x7528;
 *
 * <span class="hljs-doctag">@param</span> downloadInfo &#x9700;&#x8981;&#x6062;&#x590D;&#x7684;&#x89C6;&#x9891;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">resumeDownload</span><span class="hljs-params">(LeDownloadInfo downloadInfo)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="stopDownload">stopDownload</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x6682;&#x505C;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x7684;&#x4E0B;&#x8F7D;
 *  
 * <span class="hljs-doctag">@param</span> downloadInfo &#x9700;&#x8981;&#x6682;&#x505C;&#x7684;&#x89C6;&#x9891;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">stopDownload</span><span class="hljs-params">(LeDownloadInfo downloadInfo)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="retryDownload">retryDownload</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x91CD;&#x8BD5;&#x4E0B;&#x8F7D;&#x5931;&#x8D25;&#x7684;&#x89C6;&#x9891;
 *  
 * <span class="hljs-doctag">@params</span> downloadInfo &#x4E0B;&#x8F7D;&#x5931;&#x8D25;&#x7684;&#x89C6;&#x9891; 
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">retryDownload</span><span class="hljs-params">(LeDownloadInfo downloadInfo)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="stopAllDownload">stopAllDownload</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *&#x505C;&#x6B62;&#x5F53;&#x524D;&#x6240;&#x6709;&#x6B63;&#x5728;&#x4E0B;&#x8F7D;&#x7684;&#x89C6;&#x9891;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">stopAllDownload</span><span class="hljs-params">()</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="cancelDownload">cancelDownload</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x53D6;&#x6D88;&#x4E0B;&#x8F7D;&#x5E76;&#x4E14;&#x5220;&#x9664;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#x7684;&#x4FE1;&#x606F;,&#x53EF;&#x4EE5;&#x5220;&#x9664;&#x672C;&#x5730;&#x6587;&#x4EF6;
 *  
 * <span class="hljs-doctag">@param</span> downloadInfo &#x9700;&#x8981;&#x53D6;&#x6D88;&#x7684;&#x89C6;&#x9891;
 * <span class="hljs-doctag">@param</span> isDeleteFile &#x662F;&#x4E0D;&#x662F;&#x5220;&#x9664;&#x672C;&#x5730;&#x89C6;&#x9891;&#x6587;&#x4EF6;&#xFF0C;&#x5982;&#x679C;&#x4E3A;&#x771F;&#x8868;&#x793A;&#x5220;&#x9664;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">cancelDownload</span><span class="hljs-params">(LeDownloadInfo downloadInfo, <span class="hljs-keyword">boolean</span> isDeleteFile)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="findDownloadInfo">findDownloadInfo</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x67E5;&#x627E;&#x5F53;&#x524D;VU&#x6240;&#x5BF9;&#x5E94;&#x7684;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#x7684;DownloadInfo&#x4FE1;&#x606F;
 *  
 * <span class="hljs-doctag">@param</span> &#x89C6;&#x9891;VUID
 * <span class="hljs-doctag">@return</span> &#x5982;&#x679C;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x70B9;&#x51FB;&#x4E0B;&#x8F7D;&#x8FC7;&#xFF0C;&#x5C31;&#x8FD4;&#x56DE;&#x5F53;&#x524D;VUID&#xFF0C;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x5C31;&#x8FD4;&#x56DE;NULL
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> LeDownloadInfo <span class="hljs-title">findDownloadInfo</span><span class="hljs-params">(String vu)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="getDownloadFilePath">getDownloadFilePath</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x4FDD;&#x5B58;&#x7684;&#x672C;&#x5730;&#x8DEF;&#x5F84;
 *  
 * <span class="hljs-doctag">@param</span> vu &#x9700;&#x8981;&#x67E5;&#x8BE2;&#x7684;&#x89C6;&#x9891;VUID
 * <span class="hljs-doctag">@return</span> &#x8FD4;&#x56DE;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x4FDD;&#x5B58;&#x7684;&#x672C;&#x5730;&#x8DEF;&#x5F84;&#xFF0C;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x8FD4;&#x56DE;NULL
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> String <span class="hljs-title">getDownloadFilePath</span><span class="hljs-params">(String vu)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="isDownloadCompleted">isDownloadCompleted</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x67E5;&#x8BE2;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x662F;&#x5426;&#x4E0B;&#x8F7D;&#x5B8C;&#x6210;
 *  
 * <span class="hljs-doctag">@param</span> vu &#x9700;&#x8981;&#x67E5;&#x8BE2;&#x7684;&#x89C6;&#x9891;VUID
 * <span class="hljs-doctag">@return</span> &#x8FD4;&#x56DE;&#x67E5;&#x8BE2;&#x7ED3;&#x679C;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">boolean</span> <span class="hljs-title">isDownloadCompleted</span><span class="hljs-params">(String vu)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="registerDownloadObserver">registerDownloadObserver</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x6CE8;&#x518C;&#x4E0B;&#x8F7D;&#x72B6;&#x6001;&#x76D1;&#x542C;&#x7684;Observer,&#x53EF;&#x4EE5;&#x6CE8;&#x518C;&#x591A;&#x4E2A;
 *  
 * <span class="hljs-doctag">@param</span> observer &#x4E0B;&#x8F7D;&#x72B6;&#x6001;&#x76D1;&#x542C;&#x7684;LedownloadObserver&#xFF0C;&#x4F7F;&#x7528;&#x65F6;&#x9700;&#x8981;&#x5B9E;&#x73B0;LedownloadObserver&#x5BF9;&#x8C61;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">registerDownloadObserver</span><span class="hljs-params">(LeDownloadObserver observer)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="unregisterDownloadObserver">unregisterDownloadObserver</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x53D6;&#x6D88;&#x6CE8;&#x518C;&#x72B6;&#x6001;&#x76D1;&#x542C;Observer
 *  
 * <span class="hljs-doctag">@param</span> observer &#x9700;&#x8981;&#x53D6;&#x6D88;&#x7684;Observer
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">unregisterDownloadObserver</span><span class="hljs-params">(LeDownloadObserver observer)</span>
</span></code></pre>
<ul>
<li><blockquote>
<p><a id="setOnDownloadListener">setOnDownloadListener</a></p>
</blockquote>
</li>
</ul>
<hr>
<pre><code class="lang-java"><span class="hljs-comment">/**
 *  &#x8BBE;&#x7F6E;&#x4E0B;&#x8F7D;&#x8FC7;&#x7A0B;&#x4E2D;&#x76D1;&#x542C;&#x4E8B;&#x4EF6;&#xFF0C;&#x548C;&#x7801;&#x7387;&#x8BBE;&#x7F6E;&#x642D;&#x914D;&#x4F7F;&#x7528;
 *  
 * <span class="hljs-doctag">@param</span> listener &#x76D1;&#x542C;&#x4E8B;&#x4EF6;
 */</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">setOnDownloadListener</span><span class="hljs-params">(DownloadListener listener)</span>


<span class="hljs-comment">//&#x5185;&#x90E8;&#x63A5;&#x53E3; DownloadListener</span>

<span class="hljs-keyword">public</span> interface DownloadListener </span>{
    <span class="hljs-comment">/**
     *  &#x83B7;&#x53D6;&#x5F53;&#x524D;&#x89C6;&#x9891;&#x6240;&#x6709;&#x7801;&#x7387;
     *
     * <span class="hljs-doctag">@param</span> info &#x5F53;&#x524D;&#x6B63;&#x5728;&#x4E0B;&#x8F7D;&#x7684;&#x89C6;&#x9891;
     * <span class="hljs-doctag">@param</span> rates &#x7801;&#x7387;&#x5217;&#x8868;(&#x8FD9;&#x91CC;&#xFF0C;&#x8FD9;&#x4E2A;&#x7801;&#x7387;&#x503C;&#x548C;&#x64AD;&#x653E;&#x7684;&#x6CA1;&#x6709;&#x7EDF;&#x4E00;)
     */</span>
    <span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">onGetVideoInfoRate</span><span class="hljs-params">(LeDownloadInfo info, List&lt;String&gt; rates)</span></span>;
}
</code></pre>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../download/download_letter.html" class="navigation navigation-prev " aria-label="Previous page: 快速接入"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../download/download_observer.html" class="navigation navigation-next " aria-label="Next page: LeDownloadObserver API说明文档"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
